/**
 * 
 */
package propertyEditor;

import java.beans.PropertyEditorSupport;

import recipe.Recipe;

/**
 * @author Andrei Iordache
 *
 */
public class RecipePropertyEditor extends PropertyEditorSupport{
	
	
	@Override
	public String getAsText() {
		Recipe method = (Recipe) getValue();
		
		return method.getDescription();
	}

	@Override
	public void setAsText(String text)
			throws java.lang.IllegalArgumentException {
		Recipe value = new Recipe();
		value.setDescription(text);
		if (value == null)
			throw new IllegalArgumentException(text
					+ " is not a method of BigInteger "
					+ "with a single BigInteger argument");
		setValue(value);
	}
	
}
